import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/yb_chinese_text/yb_chinese_text.dart';


class YBHomePageMiShuPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: YBTextStyle.adapterSize87,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          //
          Container(
            child:InkWell(
              child: getMiShuType("homePageFaLvMiShu",YBChineseText.homeTextShangWuMiShuTitle, YBChineseText.homeTextShangWuMiShuSubTitle),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage');
              },
            ),
          ),
          Container(
            child:InkWell(
              child: getMiShuType("homePageshangwumishu",YBChineseText.homeTextFaLvMiShuTitle, YBChineseText.homeTextFaLvMiShuSubTitle),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage');
              },
            ),
          ),
          Container(
            child:InkWell(
              child: getMiShuType("homePageXingZhengMiShu",YBChineseText.homeTextXingZhengMiShuTitle, YBChineseText.homeTextXingZhengMiShuSubTitle),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage');
              },
            ),
          ),
        ],
      ),
    );
  }

  Widget getMiShuType(String imagStr,String titleStr,String subTitle){
     return Column(
       mainAxisAlignment: MainAxisAlignment.spaceBetween,
       crossAxisAlignment: CrossAxisAlignment.center,
       children: [
         Container(
           child: Image.asset(YBImageStyle.getImagePath(imagStr),height:YBTextStyle.adapterSize40,width:YBTextStyle.adapterSize40,),
         ),
         Container(
           child: Text(titleStr,style: YBTextStyle.homeSmallText,),
         ),
         Container(
           child: Text(subTitle,style: YBTextStyle.homeSmallSubText,),
         ),
       ],
     );
  }

}






